home *** CD-ROM | disk | FTP | other *** search
/ .net 2002 March / DotNetMagazine-Issue107-Coverdisc-NET107-02-03-PCMac.bin / pc / PC Software / free_browsing / DavesQckSearchDbar3-14 / dqsd.exe / searches / pg.xml < prev    next >
Text File  |  2002-09-30  |  5KB  |  137 lines

  1. <search function="pg">
  2.   <name>Project Gutenberg</name>
  3.   <description>
  4.     Search the Project Gutenberg Public Domain online book collection.<br/>
  5.     <div class="helpboxDescLabels">Usage:</div>
  6.       <table class="helpboxDescTable">
  7.           <tr><td>pg <<i>book title</i>> [/author] [{/reader | /dmoz}]</td></tr>
  8.       </table>
  9.     <div class="helpboxDescLabels">Switches:</div>
  10.       <table class="helpboxDescTable">
  11.           <tr><td>/author</td><td> - </td><td>Search for an Author instead of a Title</td></tr>
  12.               <tr><td>/reader</td><td> - </td><td>Search for Public Domain books on the more friendly but less complete <a href="http://www.pgreader.org">pgreader.org</a>.<br />
  13.                   HTML formatted version of some books are also offered here.</td></tr>
  14.               <tr><td>/dmoz</td><td> - </td><td>Search through the Project Gutenberg book titles and authors on the <a href="http://dmoz.org/">Open Directory Project</a>. The author switch is ignored. It seems to be faster and more accurate than the official search sometimes.</td></tr>
  15.               <tr><td>/ebi</td><td> - </td><td>Search through Tecriture's eBook Initiative site. Fairly good automated HTML conversion is available here for any book in PG's archives. Due to a lot of hidden javascript you may need to go through the <a href="http://ns2.tecriture.com/">Tecriture Home</a> to browse properly.</td></tr>
  16.       </table>
  17.     <div class="helpboxDescLabels">Examples:</div>
  18.     <table class="helpboxDescTable">
  19.           <tr><td>pg Alice In Wonderland</td></tr>
  20.               <tr><td>pg Dostoevsky /author</td></tr>
  21.               <tr><td>pg Sun Tzu /author /reader</td></tr>
  22.               <tr><td>pg Beowulf /ebi</td></tr>
  23.               <tr><td>pg Time Machine /dmoz</td></tr>
  24.       </table>
  25.   </description>
  26.   <category>Other</category>
  27.   <link>http://www.gutenberg.net/</link>
  28.   <contributor>Thad Kerosky</contributor>
  29.   
  30.   <form name="pgsearch" method="get" action="http://promo.net/cgi-promo/pg/t9.cgi"> 
  31.     <input type="hidden" name="ftpsite"
  32.             value="ftp://ibiblio.org/pub/docs/books/gutenberg/" />
  33.     <input type="hidden" name="title" value=""/>
  34.     <input type="hidden" name="author" value=""/>  
  35.   </form>
  36.   
  37.   <form name="readersearch" method="get" action="http://www.pgreader.com/apps/proc_query.asp"> 
  38.       <input type="hidden" name="title_txt" value=""/>
  39.       <input type="hidden" name="author_txt" value=""/>  
  40.   </form>
  41.   
  42.   <form name="dmozsearch" method="get" action="http://search.dmoz.org/cgi-bin/search">
  43.     <input type="hidden" name="cat" value="Arts/Literature/Electronic_Text_Archives/Project_Gutenberg"/> 
  44.     <input type="hidden" name="search" value=""/>
  45.     <input type="hidden" name="all" value="no"/> 
  46.   </form>
  47.   
  48.    <form name="ebisearch" method="post" action="http://ns2.tecriture.com/cgi-bin/ebi.cgi">
  49.      <input type="hidden" name="author"/>
  50.      <input type="hidden" name="title"/>
  51.      <input type="hidden" name="keyword"/>
  52.      <input type="hidden" name="dates"/>
  53.      <input type="hidden" name="language"/>
  54.      <input type="hidden" name="action" value="search"/>
  55.      <input type="hidden" name="line" value="1"/>
  56.   </form>
  57.  
  58.    <script><![CDATA[
  59.    
  60.     function pg(q)
  61.     {
  62.     
  63.     var searchID = 0;
  64.     var AuthorQuery = false;
  65.     
  66.       if( nullArgs("pg",q) )
  67.         return false;
  68.       else
  69.       {
  70.         var args = parseArgs(q, "reader, dmoz, ebi, author");
  71.         
  72.         if( args.switches.length > 0 )
  73.           for( var j=0; j<args.switches.length; j++ )
  74.             switch( args.switches[j].name )
  75.             {
  76.               case "reader":
  77.             searchID = 1;
  78.                 break;
  79.               case 'dmoz':
  80.                 document.dmozsearch.search.value = args.q;
  81.                 searchID = 2;
  82.                 break;
  83.               case "ebi":
  84.                 searchID = 3;
  85.                 break;
  86.                 
  87.               case "author":
  88.                 AuthorQuery = true;
  89.                 break;              
  90.             }
  91.        }
  92.       
  93.       if (!AuthorQuery) {
  94.             document.pgsearch.title.value = args.q;
  95.             document.readersearch.title_txt.value = args.q;
  96.             document.ebisearch.keyword.value = args.q;
  97.           }
  98.         else 
  99.         {
  100.           document.pgsearch.author.value = args.q;
  101.           document.readersearch.author_txt.value = args.q;
  102.           document.ebisearch.author.value = args.q;
  103.         }
  104.         
  105.           
  106.       switch (searchID) {
  107.       
  108.           case 1:
  109.             submitForm(readersearch);
  110.             break;
  111.           case 2:
  112.             submitForm(dmozsearch);
  113.             break;
  114.           case 3:
  115.             submitForm(ebisearch);
  116.             break;
  117.           default:
  118.             submitForm(pgsearch);
  119.             break;
  120.           }
  121.           
  122.           //for some reason if I don't clear these they show in the next query of a different type.
  123.           //document.pgsearch.author.value = "";
  124.         //document.readersearch.author_txt.value = "";
  125.         
  126.         //document.pgsearch.title.value = "";
  127.         //document.readersearch.title_txt.value = "";
  128.     }
  129.   ]]></script>
  130.  
  131.   <copyright>
  132.     Copyright (c) 2002 David Bau
  133.     Distributed under the terms of the
  134.     GNU Public License, Version 2 (http://www.gnu.org/copyleft/gpl.txt)
  135.   </copyright>
  136. </search>
  137.